import { http } from "@/utils/http";

export type AddNewWikiResult = {
  code: number;
  data: {
    /** Wiki ID */
    wiki_id: number;
  };
  message: string;
};

export type GetWikiTreeResult = {
  code: number;
  data: [

  ];
  message: string;
}

/** 新增Wiki */
export const addNewWiki = (data?: object) => {
  return http.request<AddNewWikiResult>("post", "/dcc/api/wiki_info/add_wiki", { data });
};

/** 获取项目列表 */
export const getWikiTree = (data?: object) => {
  return http.request<GetWikiTreeResult>("post", "/dcc/api/wiki_info/get_wiki_tree", {
    data
  });
};
